﻿@model PerformanceAssessment.Models.Assessment

@{
    ViewBag.Title = "Accept";
}

@using PerformanceAssessment.Models;
<h2>Submit Assessment</h2>
@if (ViewBag.assessmentStatus == AssessmentStatus.AutoEvaluationCompleted || ViewBag.assessmentStatus == AssessmentStatus.DisagreementSolved)
{
    <h3>Are you sure you want to Approve this auto evaluation?</h3>
}
else
{
    if (ViewBag.assessmentStatus == AssessmentStatus.ManagerAssessmentCompleted)
    {
        <h3>Are you sure you want to Approve this manager evaluation?</h3>
    }
    else
    {
        <h3>Are you sure you want to Submit this assessment? </h3>
        <p style="color:Red;">You will not be able to do any changes after this action</p>
    }
}
@using (Html.BeginForm()) {
<fieldset>
        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.IdAssessmentPeriod)
        @Html.HiddenFor(model => model.FromDate)
        @Html.HiddenFor(model => model.ToDate)
        @Html.HiddenFor(model => model.IdEmployee)
        @Html.HiddenFor(model => model.IdManager)
        @Html.HiddenFor(model => model.IdAssessmentStatus)
    <div class="display-label">
            Review Period</div>
        <div class="display-field">
            From: @Html.Label("FromDate", Model.FromDate.ToShortDateString()) To: @Html.Label("ToDate", Model.ToDate.ToShortDateString())
        </div>
        <div class="display-label">
            Employee</div>
        <div class="display-field">
            @Html.Label(string.Format("{0} {1} {2}", Model.Employee.FirstName, Model.Employee.FirstLastName, Model.Employee.SecondLastName))
        </div>
        <div class="display-label">
            Manager</div>
        <div class="display-field">
            @Html.Label(string.Format("{0} {1}", Model.Manager.FirstName, Model.Manager.LastName))
        </div>
        <div class="display-label">
            Employee Comments</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.EmployeeComments)
        </div>
        <div class="display-label">
            Manager Comments</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.ManagerComments)
        </div>
</fieldset>

    <p>
        <input type="submit" value="Accept" /> |
        @Html.ActionLink("Back to Assessment", "Details", new { assessmentId = Model.ID })
    </p>
}
